import { createApp } from 'vue'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { library } from '@fortawesome/fontawesome-svg-core'
// 导入需要的图标（以 solid 风格为例）
import { 
  faBarChart, 
  faHome, 
  faQuestionCircle, 
  faFileText, 
  faCloudUpload, 
  faFolderOpen, 
  faPencilSquare, 
  faLineChart, 
  faRandom, 
  faSliders, 
  faTable, 
  faAreaChart, 
} from '@fortawesome/free-solid-svg-icons'

// 新增：导入根组件 App.vue
import App from './App.vue'  // 确保路径正确（假设 App.vue 在当前目录）

// 新增：如果使用了路由，需要导入 router
import router from './router'  // 根据项目实际路由路径调整

library.add(
  faBarChart, 
  faHome, 
  faQuestionCircle, 
  faFileText, 
  faCloudUpload, 
  faFolderOpen, 
  faPencilSquare, 
  faLineChart, 
  faRandom, 
  faSliders, 
  faTable, 
  faAreaChart, 
)

const app = createApp(App)
app.component('FontAwesomeIcon', FontAwesomeIcon)
app.use(router)  // 如果使用了路由，保留这行
app.mount('#app')